package com.stageadminserver.adminserver.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.stagecommon.common.pojo.RespBean;
import com.stagecommon.common.pojo.WorksInfo;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;


public interface WorksInfoService extends IService<WorksInfo> {

    /**
     * ͨ����Ʒid��ȡ��Ʒ
     * @param workId
     * @return
     */
    RespBean<WorksInfo> selectWorkInfoById(Long workId);

    /**
     * ͨ����Ʒid������Ʒ
     * @param worksInfo
     * @return
     */
    RespBean<Integer> updateWorkById(WorksInfo worksInfo);

    /**
     * ������Ʒidɾ����Ʒ
     * @param worksInfo
     * @return
     */
    RespBean<Integer> deleteWorkById(WorksInfo worksInfo);

    /**
     * �ϴ���Ʒ�ļ�
     * @param file
     * @param poster
     * @param worksInfo
     * @return
     * @throws Exception
     */
    RespBean uploadFile(MultipartFile file, MultipartFile poster, WorksInfo worksInfo) throws Exception;

    /**
     * ��ȡ������Ʒ
     * @return
     */
    RespBean<List<WorksInfo>> selectAllWorks();

    /**
     * ��ҳ��ȡ��Ʒ
     * @param currentPage
     * @param size
     * @param worksInfo
     * @return
     */
    RespBean<IPage<WorksInfo>> getWorksInfoByPage(Long currentPage, Long size, WorksInfo worksInfo);

}
